//
//  dataModel.m
//  ILiangCang
//
//  Created by ZX on 16-4-15.
//  Copyright (c) 2016年 CRQ. All rights reserved.
//

#import "dataModel.h"

@implementation dataModel

+(id)dataModelWithDictionary:(NSDictionary *)dataModelDic
{
    return [[self alloc]initWithDictionary:dataModelDic];
}
-(id)initWithDictionary:(NSDictionary *)dic
{
    self = [super init];
    if (self)
    {
        _slideID = dic[@"slide_id"];
        _contentID = dic[@"content_id"];
        _picURL = [NSURL URLWithString:dic[@"pic_url"]];
        _contentType = dic[@"content_type"];
        _orderNum = dic[@"order_num"];
        _topicName = dic[@"topic_name"];
        _topicURL =[NSURL URLWithString: dic[@"topic_url"]];
        _headerURL = [NSURL URLWithString:dic[@"logo"][@"url"]];
        _name = dic[@"name"];
        _descrip = dic[@"description"];
        
        _coverImage =[NSURL URLWithString:dic[@"cover_img"]];
                        
    }
    return self;
    
}

@end
